import java.util.Scanner;
public class Test6 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int a = (int) Math.floor(Math.sqrt(n));
        while (n % (a * a) != 0) {
            a--;
        }
        int b = n / (a * a);
        System.out.println(a + " " + b);
        scanner.close();
    }
}